<?php

/**
 * 学生类
 */
class Student
{
    // 学生编号
    public $id;
    // 学生姓名
    public $name;
    // 学生性别
    public $sex;
    // 学生年龄
    public $age;
    // 年龄开始
    public $ageStart;
    // 年龄截止
    public $ageEnd;
    // 学生城市
    public $city;
    // 学生省份
    public $province;

    /**
     * @param $id
     * @param $name
     * @param $sex
     * @param $age
     * @param $city
     */
    public function __construct($id, $name, $sex, $age, $city)
    {
        $this->id = $id;
        $this->name = $name;
        $this->sex = $sex;
        $this->age = $age;
        $this->city = $city;
    }

    public static function empty(): Student
    {
        return new Student(null, null, null, null, null);
    }

    public function __toString(): string
    {
        return "Id:" . $this->id . ", Name:" . $this->name . ", Sex:" . $this->sex . ", Age:" . $this->age . ", City:" . $this->city . ", Province:" . $this->province;
    }


}